<?php
namespace app\index\controller;
use think\Controller;
use app\index\model\repoter;
use app\index\model\share;
use app\index\model\activity;
class News extends Controller{

    public function index($category){
       switch($category){
           case "Notice":   //公告
                $repoter = new repoter();
                $list=$repoter->getRepoterPage();
                $page=$list->render();
                break;
           case "Share":   //新闻
                $share = new share();
                $list=$share->getRepoterPage();
                $page=$list->render();
                break;
           case "Activity":    //讲座
                $activity = new activity();
                $list=$activity->getRepoterPage();
                $page=$list->render();
                break;
       }
       $this->assign('list',$list);
       $this->assign('page',$page);
       $this->assign('Visitors',config('Visitors'));
       dump($page);
       return $this->fetch('showPage');
       

    }



}